docs(gate): contradictsWrapperResolution's docblock still described the flat bare-name index #13474 replaced - #13846
Merged
os-project-manager merged 1 commit intoAug 31, 2026
Conversation
…he flat bare-name index #13474 replaced indexFunctionBodies' flat last-wins map with call-site lexical resolution, which made one clause of this predicate's docblock false: the paragraph narrates the historical defect in the past tense but asserted the flat index in the PRESENT. The paragraph is kept — it is why the predicate exists — and only that clause moves to the past tense. A closing block states what #13474 did and why this predicate survives it: the resolver settles collisions between same-named BODIES, this one asks about a collision across RECEIVERS, and the ONE DECLARATION => UNCHANGED rule routes a unique name reached on a compound receiver straight here. Re-measured on this tree, ablating the predicate: the two #12358 self-test cases report 1 seam each instead of 0, and --list over the scan root is byte-identical (66 seams either way). Prose only. The predicate's body is unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pk26oZ12t5N1hwGW1m1MgC
os-project-manager
marked this pull request as ready for review
August 31, 2026 15:43
os-project-manager
deleted the
claude/issue-13787-wrapper-resolution-docblock
branch
August 31, 2026 16:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #13787
Prose only.
contradictsWrapperResolution's predicate is byte-identical toorigin/main— 1128 characters,sha256dccdd2b341d10650…on both sides — and the whole diff is comment lines: 0 non-comment lines added, 0 removed, in 3 hunks that all sit inside that one docblock. The fence #13474 put on the predicate is intact; this card is its docblock, and nothing else.The corrected clause — before / after
The card is one sentence, and it wraps across two lines, which is why a single-string grep for it returns zero. Before (the only clause in the file that asserted the flat index in the present tense):
After:
The paragraph is kept whole. It narrates the historical defect that motivates the predicate, and
asked nothing at all/was followedwere already past tense on purpose; only thefunctionBodiesclause was wrongly in the present. Two words move (istoWAS,happenstohappened) plus a three-line forward pointer. Flattening the whole paragraph to a description of today's index would have deleted the motivation.The second hunk adds a closing block to the same docblock, next to the existing zero-cost statement, so the reader who lands on the predicate is told what #13474 did and why this predicate survives it:
That pointer is deliberate and it is the pair's near half:
indexFunctionBodies' docblock already points at this predicate from ~900 lines away, and now this one points back.Is the predicate's motivation still sound after #13474? — measured, and yes
#13784's docblock claims the predicate stays load-bearing (a unique name reached on a compound receiver is admitted by the one-declaration rule and refused by that predicate). Verified on this tree by ablation rather than by reading:
return false;injected as the first statement ofcontradictsWrapperResolution, mutation confirmed on disk before the run (marker count 0 to 1, 335171 to 335207 bytes,git diff --statone insertion), restored afterwards withgit checkout HEAD -- ...and the restore proved by hash (d0dc23ff…before and after) plus an emptygit diff HEAD. No build step exists between edit and run — the gate is an.mjsexecuted from source, not from adist/.--self-test, read-seam rule--list, whole scan rootThe two failures are exactly the two
#12358fixtures, one per clause:Both fixtures declare
deleteexactly once, soindexFunctionBodies' one-declaration rule answers the name from any call site and hands the hop straight to this predicate. The scope-aware resolver does not and cannot refuse them — it settles same-name collisions, and there is no collision here. ⇒ the motivation is unchanged in force, narrower in wording: the docblock should no longer say the index is flat, but the reason the predicate exists is untouched, and the file's zero-seam cost figure for it is still zero after the resolver changed.Census — every
bare name/flat indexmention in the file, classifiedCensused by mechanism (
functionBodies,BARE NAME,bare name,flat,LAST-WINS,scope-aware,13474as separate terms), never as one contiguous string.helper resolution is file-scoped by construction (functionBodies is built per source file)functionBodies WAS keyed by bare name and LAST-WINS … #13474 replaced the flat indexfunctionBodies is a flat, file-scoped index keyed by BARE NAMEOnly const/let declarations with an initializer are indexed, keyed by bare name and LAST-WINS. That is deliberately NOT the scope-aware model indexFunctionBodies moved to for #13474indexLogAliases), still bare-name last-wins on purpose, with the departure measured and stated.## Why this is not keyed by bare name alone (#13474) — It was, and it was LAST-WINS … the flat index answered with the THIRDindexFunctionBodies' own docblock, historical narration, the far half of the pair.the tie-break the flat index already madeindexFunctionBodies keys by BARE NAME, so an unrelated close() in another class in the same file could supply that licenceMapof name to a list of declarations); what changed is that resolution is no longer by key alone. The hazard it warns about also survives, through the one-declaration rule: aclosedeclared once in the file is still answered from any call site, including from another class. True as written, so it is untouched.Before it, the index was one flat Map … (1) the flat index DROPS a real seam … The flat index answered with the thirdNothing was changed on grounds of resemblance: 1529–1530 is the only present-tense assertion of the replaced shape.
Verification
Every gate run explicitly, exit code captured before any pipe. Final commit for all of it:
de44eb1b9.pnpm check:durability-log-levelexit=0—✓ self-test (log-level rule): 63 case(s) passed·✓ self-test (read-seam invention rule): 57 case(s) passed·✓ read-seam invention …: 66 read seam(s), none invents an unreported answerpnpm check:ratchet-remedy-authorityexit=0—OK check-ratchet-remedy-authority: 176 scripts swept (scripts/*.{mjs,mts}); 11 mark the expanding remedy ⛔ MAINTAINER-ONLY, 5 turn it down outright, 160 hand out no ratchet-expanding remedy.node scripts/check-ratchet-remedy-authority.mjs --self-testexit=0—OK self-test: the lexer holds, messages are bounded, …pnpm check:nul-bytesexit=0pnpm lint(repo-wideeslint . --no-inline-config, not narrowed)exit=0, no findingspnpm check:agent-test-spelling,check:bash32-floor,check:cli-command-ids,check:cross-package-test-inputs,check:entry-guard,check:parse-guard,check:pnpm-filter-targets,check:watch-hint-literalexit=0node scripts/check-ci-filter-parity.mjs,check-cross-package-test-inputs.mjs,check-shard-attestation.mjsexit=0node scripts/check-test-completeness.mjsexit=3— NOT MEASURED, not a red: the gate grades a savedturbo run testlog and none was named. Its own text says to record it as NOT MEASURED when run from the derived family.node scripts/pm/bare-root-worklist.mjs --self-testexit=0— convention-triggered (this edits a gate script)pnpm check:pm-dispatch-gatesexit=0— same convention triggerpnpm --filter @objectstack/metadata-protocol exec vitest run --maxWorkers=2 src/sys-metadata-repository.draft-drain.test.ts src/protocol.metadata-store-outage.test.tsexit=0—Test Files 2 passed (2),Tests 44 passed (44). These are the pin tests that read this script by path, so they are owed on top of the path-derived family.The family was re-derived from the real diff with
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack(no paths passed), which also surfaced the two convention-triggered obligations above.Why there is no changeset
The dispatch order asked for one. This diff publishes nothing: it is comment lines in
scripts/check-durability-degradation-log-level.mjs, a repo-root gate script that belongs to no published package, so a changeset would have to name a package and fabricate a CHANGELOG entry for a comment. An empty-frontmatter changeset is not the alternative —scripts/check-empty-changeset.mjsrejects newly added ones outright, and its header records why. Precedent on this exact file is uniform: of the last 12 commits touching it, the 10 that were script-only carried zero changeset files, #13474's own PR (6207c9ecc) among them.skip-changesetis applied to this PR instead, and read back after applying.Generated by Claude Code